#ifndef __MARS_GRAPHICS_MESH_MGR_H__
#define __MARS_GRAPHICS_MESH_MGR_H__

#include "MarsObject.h"
#include "MarsPipelineType.h"

namespace Graphics
{

class Mesh;

class MeshMgr : public Object
{
public:
									MeshMgr();
									~MeshMgr();

	bool							Initialize();
	void							Shutdown();

	static MeshMgr&					Instance();
	static void						Destroy();

	Mesh*							LoadMesh( const std::string& strMeshName, MeshImportType eType );

private:
	static MeshMgr*					ms_pMeshMgr;

private:
	typedef std::map< uint32, Mesh* > MeshMap;
	typedef MeshMap::iterator MeshMapItr;
	typedef MeshMap::const_iterator MeshMapConstItr;

	MeshMap							m_mapMeshes;
};

inline MeshMgr& MeshMgr::Instance()
{
	if ( !ms_pMeshMgr )
	{
		ms_pMeshMgr = new MeshMgr();
	}

	return ( *ms_pMeshMgr );
}

} // end of namespace Graphics

#endif // end of #ifndef __MARS_GRAPHICS_MESH_MGR_H__